{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid character in identifier (<ipython-input-6-25eb6996214e>, line 13)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-6-25eb6996214e>\"\u001b[1;36m, line \u001b[1;32m13\u001b[0m\n\u001b[1;33m    return   y.sum() > 0 ？ 1 ： 0\u001b[0m\n\u001b[1;37m                         ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid character in identifier\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "sample_import = np.array([[0,0],[0,1],[1,0],[1,1]])\n",
    "sample_and  = np.array([0,0,0,1])\n",
    "sample_or = np.array([0,1,1,1])\n",
    "sample_xor = np.array([0,1,1,0])\n",
    "class Neuron:\n",
    "    def __init__(self):\n",
    "        self.weight = np.random.normal(size = 2)\n",
    "        self.bias = np.random.normal(size=1)\n",
    "    def active(self,x):\n",
    "        y = np.dot(x,self.weight) + self.bias\n",
    "        print(y)\n",
    "        return   y.sum() > 0 ？ 1 ： 0\n",
    "n = Neuron()\n",
    "y = n.active(sample_import[0])\n",
    "print(y)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
